package top.dingyingying.springboot3.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("tb_student")
public class TbStudent implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer classId;
    private String name;
    private String sex;
    private String address;
    private String phone;

    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private Date createAt;
    //这是自定义字段，关联在班级，在数据表中不存在
    @TableField(exist = false)
    private TbClass tbClass;

}
